﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NGUYENTHUTRANG.OOP.SAMPLE
{
    public partial class Mainview : Form
    {
        public Mainview()
        {
            InitializeComponent();
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void Mainview_Load(object sender, EventArgs e)
        {
            student objsv1;
            student objsv2;
            student objsv3;
            student objsv4;

            objsv1 = new student("SV01","Hoàng Văn Thanh","abc@gmail.com","123456789");

            objsv2 = new student("SV02", "Phạm Thị Thùy Linh", "abc@gmail.com", "123456789");

            objsv3 = new student("SV03", "Trần Văn Hiếu", "abc@gmail.com", "123456789");

            objsv4 = new student("SV04", "Nguyễn Văn Hùng", "abc@gmail.com", "123456789");


            objsv1._masv="SV01";
            objsv1._fullname="Hoàng Văn Thanh";
            objsv1._email = "thanhhv@gmail.com";
            objsv1._phone = "0988123456";

            objsv2._masv="SV02";
            objsv2._fullname="Phạm Thị Thùy Linh";
            objsv2._email = "linhptt@gmail.com";
            objsv2._phone = "0988123456";

            objsv3._masv="SV03";
            objsv3._fullname="Trần Văn Hiếu";
            objsv3._email = "hieutv@gmail.com";
            objsv3._phone = "0988123456";

            objsv4._masv="SV04";
            objsv4._fullname="Nguyễn Văn Hùng";
            objsv4._email = "hungnv@gmail.com";
            objsv4._phone = "0988123456";

            listBox1.Items.Add("------------SinhVien1--------------");
            listBox1.Items.Add("Masv : " + objsv1._masv);
            listBox1.Items.Add("Fullname : " + objsv1._fullname);
            listBox1.Items.Add("Email : " + objsv1._email);
            listBox1.Items.Add("Phone : " + objsv1._phone);

            listBox1.Items.Add("------------SinhVien2--------------");
            listBox1.Items.Add("Masv : " + objsv2._masv );
            listBox1.Items.Add("Fullname : " + objsv2._fullname);
            listBox1.Items.Add("Email : " + objsv2._email);
            listBox1.Items.Add("Phone : " + objsv2._phone);

            listBox1.Items.Add("------------SinhVien3--------------");
            listBox1.Items.Add("Masv : " + objsv3._masv);
            listBox1.Items.Add("Fullname : " + objsv3._fullname);
            listBox1.Items.Add("Email : " + objsv3._email);
            listBox1.Items.Add("Phone : " + objsv3._phone);

            

            listBox1.Items.Add("------------SinhVien4--------------");
            listBox1.Items.Add("Masv : " + objsv4._masv);
            listBox1.Items.Add("Fullname : " + objsv4._fullname);
            listBox1.Items.Add("Email : " + objsv4._email);
            listBox1.Items.Add("Phone : " + objsv4._phone);







            
           

           



        }
    }
}
